package sec_pages;


import org.openqa.selenium.WebElement;
import utils.Log4Test;

public class EditPersonalDataPage extends SecGeneralPage {

    public WebElement verifyEditPersonalDataPageIsOpened() {

        Log4Test.info("Verify  - EditPersonalDataPage is opened");

        return elementIsLocated(getLocator("titleEEditPersonalDataPage"));

    }

    public void fillAdressDataAndSave(String city, String street, String numberAp) {

        elementIsLocated(getLocator("city")).clear();
        elementIsLocated(getLocator("city")).sendKeys(city);

        elementIsLocated(getLocator("street")).clear();
        elementIsLocated(getLocator("street")).sendKeys(street);

        elementIsLocated(getLocator("numberAp")).clear();
        elementIsLocated(getLocator("numberAp")).sendKeys(numberAp);

        elementIsLocated(getLocator("saveEditButton")).click();


        Log4Test.info("Changed delivery address city- Киев, street- Полевая, numberAp - 24 ");
    }
}
